<template>
	<view class="">
		<view class="">
			<!-- 2.0.19支持autoBack，默认为false -->
			<u-navbar leftText="智慧社区" :autoBack="true">
			</u-navbar>
		</view>


		<view class="con-body wrap">
			<view style="width:94%;padding-left:3%">
				<view style="text-align: center; margin-top: 10rpx;margin-bottom:30rpx;">
					<image style="width:100%;"  :src="article.image" mode="widthFix"></image>
				</view>
				<view style="font-weight: bold;font-size: 32rpx;color:#333">{{article.title}}</view>
				<view style="font-size: 24rpx;color:#999;margin:20rpx 0;"><text style="margin-right:30rpx">物业服务中心</text>{{article.time}}</view>
				
				<view class="u-content">
					<u-parse :content="article.content"></u-parse>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		getArticle
	} from "@/service/configService.js";
	export default {
		data() {
			return {
				title: '精选文章',
				article: {}
			};
		},
		onLoad(options) {
			// console.log(options);
			getArticle({
				id: options.id
			}).then(this.getArticle);
		},
		methods: {
			getArticle(e) {
				// console.log(e);
				if (e.code == 200) {
					this.article = e.result;
					this.title = this.article.title;
				} else {
					this.$u.route({
						url: '/pagesCommunity/index/index',
						params: {

						}
					});
				}
			}
		}
	};
</script>

<style>
	page {
		background-color: #fff;
	}

	.u-content {
		margin-top: 20rpx;
		/* padding: 0rpx 10rpx; */
	}
</style>
